import { allOf, IMatcher } from "db://delta/ecs/ecs";
import { ECSComblockSystem } from "db://delta/ecs/ecs_system";
import { PositionCompent } from "../compents/position_compent";
import { ECSEntity } from "db://delta/ecs/ecs_entity";


export class MoveSystem extends ECSComblockSystem {
    filter(): IMatcher {
        // throw new Error("Method not implemented.");
        return allOf(PositionCompent);
    }
    init(){
    }

    firstUpdate(entity: ECSEntity) {
        console.log("first update", entity);
        
    }

    update(entity: ECSEntity) {
        const pos = entity.get(PositionCompent);
        pos.pos.x += 1;
        pos.pos.y += 1;
    }
    
}

